package com.blog.mapper;

import com.blog.model.Page;
import com.blog.pojo.Article;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataAccessException;

public interface ArticleMapper extends CommonMapper<Article> {
	
    int countByExample(Article article)  throws DataAccessException;

    List<Article> selectByExample(@Param("article")Article article,@Param("page")Page page)  throws DataAccessException;

    Article selectPreviousByPrimaryKey(Integer articleId)throws DataAccessException;
    
    Article selectNextByPrimaryKey(Integer articleId)throws DataAccessException;
    
    List<Article> selectByViewCount(Integer end)throws DataAccessException;
    
    List<Article> selectByCateId(Integer cateId)throws DataAccessException;
}